package com.alienlab.utils;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.commons.beanutils.DynaBeanMapDecorator;

public class MyTimerListen  implements ServletContextListener {

	private NewsXmlTimer  newsXmlTimer =new NewsXmlTimer(); 
	@Override
	public void contextDestroyed(ServletContextEvent event) {
		newsXmlTimer.newsTimerDestory();
		
		
	}
	@Override
	public void contextInitialized(ServletContextEvent event) {
		NewsManage.initAnyscDownloader();//只能调用一次
		newsXmlTimer.newsTimerStart(0, 1000*60*60);
	}
}
